package com.usian;

import com.usian.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "provider") //value 被调用者的服务名，
public interface UserFeign {

    @RequestMapping("/findById/{id}")
    public User findById(@PathVariable Integer id);

    /**
     * getmapping  ?
     * @param id
     * @return
     */
    @GetMapping("/findByName")
    public User findByName(@RequestParam Integer id,@RequestParam String name);

    @PostMapping("/findByUser")
    public User findByUser(@RequestBody User user);
}
